package classes.Commands
{
	import components.editor.c_baseEditor;
	import components.editor.c_baseElement;
	
	public class c_commandFromEditor extends c_baseCommand {
		private var _editor			: c_baseEditor;
		private var _prevLink		: c_baseElement;
		public function c_commandFromEditor(a_editor: c_baseEditor, a_element:c_baseElement=null) {
			super(a_element);
			_editor = a_editor;
		}
		
		override public function get editor(): c_baseEditor {
			return _editor;
		}
		
		override public function Execute():void {
			_prevLink 	= _editor.dragRect.link;
			super.Execute();
		}
		
		override public function unExecute():void {
			super.unExecute();
			_editor.dragRect.link = _prevLink;
		}
	}
}